<?php

require_once "../../tfsbox.class.php";
require_once "tfsbox_phpbb3_session.class.php";
require_once "tfsbox_phpbb3_view.class.php";

class TFsBOX_PHPBB3 extends TFsBOX
	{
		function __construct($config_log = null,
							 $shouts_log = null,
							 $ip_log = null,
							 $url_log = null,
							 $wordfilters_log = null,
							 $config_obj = null,
							 $db_obj = null)
			{
				parent::__construct($config_log,
									$shouts_log,
									$ip_log,
									$url_log,
									$wordfilters_log,
									$config_obj,
									$db_obj,
									'TFsBOX_PHPBB3_Session',
									'TFsBOX_PHPBB3_View');

				define('PHPBB3_ROOT_PATH', TFsBOX::$Config->value('phpbb3_path', $_SERVER['DOCUMENT_ROOT'].'/phpbb3/'));
			}

		function renderShoutBox($show_title_bar = true)
			{
				if ($show_title_bar)
					TFsBOX_PHPBB3_View::renderShoutBoxTitleBar();

				TFsBOXAbstractView::renderErrors();

				TFsBOXAbstractView::renderNotices();

				echo "<div id=\"tfsbox_content\">\n";
				self::$View->renderShouts(false, false);
				echo "</div>\n";

				if (self::$Session->loggedIn()
				 && !self::$Database->isIpBanned(self::$Session->ip()))
					self::$View->renderShoutForm();
			}
	}

?>
